package cn.zhengzhou.springbootmybatis.demo;

import java.net.Socket;
import java.util.concurrent.Callable;

public class RunnableNew implements Callable<String> {
    private int n;


    public RunnableNew(int n) {
        this.n = n;
    }

    @Override
    public String call() throws Exception {
        int sum = 0;
        Thread.sleep(10000);
        for (int i = 0; i < n; i++) {
            sum += i;
        }
        return Thread.currentThread().getName() +n+"的和是："+ sum;
    }
}
